import request from '@/utils/request'

// 查询dishitem列表
export function listDishitem(query) {
  return request({
    url: '/dishitem/list',
    method: 'get',
    params: query
  })
}

// 分页查询dishitem列表
export function listDishitemByPage(query) {
  return request({
    url: '/dishitem/page',
    method: 'get',
    params: query
  })
}

// 查询dishitem
export function getDishitem(id) {
  return request({
    url: '/dishitem/' + id,
    method: 'get'
  })
}

// 新增dishitem
export function addDishitem(data) {
  return request({
    url: '/dishitem',
    method: 'post',
    data: data
  })
}

// 修改dishitem
export function updateDishitem(data) {
  return request({
    url: '/dishitem',
    method: 'put',
    data: data
  })
}

// 删除dishitem
export function deleteDishitem(id) {
  return request({
    url: '/dishitem/delete/' + id,
    method: 'delete'
  })
}
